package com.czk.controller;

import com.czk.mapper.UdictMapper;
import com.czk.pojo.Udict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 公共表的操作
 * 此时会向多个数据源里面的表插入数据
 *
 * @Author:ChenZhangKun
 * @Date: 2021/6/20 16:00
 */
@RestController
@RequestMapping("/udict")
public class UdictController {
    @Autowired
    private UdictMapper udictMapper;

    @GetMapping("/insert")
    public Udict insert() {
        Udict udict = new Udict();
        udict.setUstatus("a");
        udict.setUvalue("已启用");
        udictMapper.insert(udict);
        return udict;
    }
}
